package com.wingsoft.homeFlow.bo;

import com.alibaba.druid.pool.DruidDataSource;
import com.wingsoft.homeFlow.entity.HomeFlowSource;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
public class HomeFlowSourcePoolBo {
    public HomeFlowSourcePoolBo(HomeFlowSource homeFlowSource) {
        this.homeFlowSource = homeFlowSource;
    }

   @ApiModelProperty("数据源")
    private DruidDataSource druidDataSource;

   @ApiModelProperty("地址")
    private HomeFlowSource homeFlowSource;

   @ApiModelProperty("key")
    public String getKey() {
        return homeFlowSource.getType()
                + homeFlowSource.getDriver()
                + homeFlowSource.getAddress()
                + homeFlowSource.getUsername()
                + homeFlowSource.getPassword();
    }

   @ApiModelProperty("最后活动时间")
    private Date lastActiveTime;

}